home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / games / IndiZone / gold / doers.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  3.7 KB  |  132 lines

  1. /*
  2.  * The original copyright owners of the accompanying source code files have
  3.  * agreed to place such code into the public domain.  Accordingly, anyone
  4.  * who receives or obtains a copy of such source code is freely entitled to
  5.  * reproduce, use and otherwise exploit such code (including the right to
  6.  * make derivative works), at his/her own risk and expense, without any
  7.  * obligation or liability to the original copyright owners.
  8.  *
  9.  * We would appreciate (but do not require) that the following message be
  10.  * included in any derivative works:
  11.  *
  12.  * "Portions of this program were developed by Peter Broadwell, Rob Myers
  13.  * and Robin Schaufler while working in Silicon Valley."
  14.  *
  15.  * The accompanying source code files and related documentation materials
  16.  * are distributed on an "AS IS" basis, without any warranties or
  17.  * guarantees of any kind.  All implied warranties, including the implied
  18.  * warranties of merchantability and of fitness for any particular purpose,
  19.  * are expressly disclaimed.
  20.  */
  21. typedef struct {
  22.     behavior me;
  23.     long offsetFactor;
  24. } wiggler;
  25.  
  26. typedef struct {
  27.     subscr sentry;
  28.     long angle;
  29.     long magnitude;
  30.     unsigned long wiggleClock;
  31. } wigglerVars;
  32.  
  33. typedef struct {
  34.     subscr sentry;
  35.     point stake;
  36.     long tether;
  37.     unsigned long circleClock;
  38.     long circleIncr;
  39. } circlerVars;
  40.  
  41. typedef struct {
  42.     subscr sentry;
  43.     point maxvelocity;
  44. } swerverVars;
  45.  
  46. typedef struct {
  47.     subscr sentry;
  48.     long inited;
  49.     long influenced;
  50.     rgbcolor nativeColor;
  51.     rgbcolor importColor;
  52. } chameleonVars;
  53.  
  54. typedef struct {
  55.     subscr sentry;
  56.     rgbcolor exportColor;
  57. } colorizerVars;
  58.  
  59. typedef struct {
  60.     behavior me;
  61.     int surface;
  62. } surfaceDie;
  63.  
  64. typedef struct {
  65.     subscr sentry;
  66.     float scaleMax;
  67.     float scaleIncr;
  68. } expanderVars;
  69.  
  70. typedef struct {
  71.     subscr sentry;
  72.     int lifeSpan;    /* in tics */
  73.     int age;        /* in tics */
  74. } faderVars;
  75.  
  76. typedef struct {
  77.     subscr sentry;
  78.     int frequency;    /* in tics */
  79.     int tic;
  80. } trailGhostVars;
  81.  
  82. typedef struct {
  83.     subscr sentry;
  84.     unsigned int clock;    /* time since subscription */
  85.     unsigned int alarm;    /* metamorphosis time */
  86.     individual *embryo;    /* metamorphize into one of these */
  87. } metamorphVars;
  88.  
  89. typedef struct {
  90.     subscr sentry;
  91.     int n_girls;    /* number of girls to lay */
  92.     int n_boys;        /* number of boys to lay */
  93.     int max_population;    /* for population control */
  94.     inst *mate;        /* points to mate while they share a voxel */
  95. } femaleVars;
  96.  
  97. typedef struct {
  98.     subscr sentry;
  99.     int interest;        /* how interested am I in finding a mate? */
  100.     int rate;            /* tics per increment in interest  */
  101.     int tics;            /* tics since last change in interest  */
  102.     int min_int;        /* minimum interest */
  103.     int max_int;        /* maximum interest */
  104.     float eyescale;        /* how wide his eyes get */
  105.     unsigned flags;
  106. #define FOUND_THIS_TIC 01    /* found a female this tic */
  107. #define FOUND_LAST_TIC 02    /* found a female last tic */
  108. } maleVars;
  109.  
  110. typedef struct {
  111.     subscr sentry;
  112.     int interest;        /* how interested am I in finding food? */
  113.     int rate;            /* tics per increment in interest  */
  114.     int tics;            /* tics since last change in interest  */
  115.     int min_int;        /* minimum interest */
  116.     int max_int;        /* maximum interest */
  117.     int cannibal;        /* TRUE for cannibalistic species */
  118.     float bubscale;        /* how big a bubble he burps */
  119. } feederVars;
  120.  
  121. typedef struct {
  122.     subscr sentry;
  123.     long inited;
  124.     long influenced;
  125.     float scalefactor;
  126. } wideyeVars;
  127.  
  128. #define UNINITED    0    /* chameleon has not saved its native color */
  129. #define INITED        1    /* chameleon has saved its native color */
  130. #define UNINFLUENCED    2    /* chameleon has absorbed last influence */
  131. #define INFLUENCED    3    /* chameleon has influence pending */
  132.